package com.baomidou.springboot.repository;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.springboot.db.entity.WxTokenObj;
import com.baomidou.springboot.db.mapper.WxTokenMapper;
import org.springframework.stereotype.Component;

/**
 * Created by kevin on 2018/7/31.
 */
@Component
public class WxTokenRepository extends ServiceImpl<WxTokenMapper, WxTokenObj> implements IWxTokenRepository {
    public WxTokenObj getToken(String uuid) {
        return baseMapper.selectOneBySQL(uuid);
    }

    public WxTokenObj getToken(Wrapper wrapper) {
        return baseMapper.selectOneByWrapper(wrapper);
    }
}